Hi all, I have an attribute to show the parent object number for objects, is there a way though to return the first three levels only so for object 2.5.1.2.0-1 the result would be 2.5.1 and not as it is now 2.5.1.2 Thank you, Michael
BowaterHouse - Wed Nov 04 12:42:24 EST 2015 |
Re: DXL Attribute to Show Parent Object 3 Numbers //try
Object po =current |
Re: DXL Attribute to Show Parent Object 3 Numbers Hi DHAM,
Thank you for your response and code! Initially it returned no values, so I compared the code to what I had before and changed the last line to 'display s' instead of 'print s' and this worked for which ever object was selected but would return the same value for all other objects. So I had a look at some other DXL code that someone has given me in the past and adapted your code to what is shown below, and it works a treat! Thank you very much DHAM, much appreciated!
I will mark this post as the correct answer as it has the final working code but all kudos deserves to go to DHAM. |